﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Objects.DataClasses;

namespace IRC.IRepairClouds.DataLayer
{
    public static class EntityReferenceExtensions
    {

        public static int GetKey(this EntityReference<ETimeZone> entityReference)
        {
            return entityReference.GetKeyValue(i => i.TimeZoneId);
        }

        public static Guid GetKey(this EntityReference<EUser> entityReference)
        {
            return entityReference.GetKeyValue(i => i.ID);
        }
    }
}
